<?php

namespace Hilaoyu\LaravelExtend\Services\Auth;


use Hilaoyu\LaravelExtend\Services\Auth\Traits\ModelWithLoginRefreshTrait;
use Hilaoyu\Utils\UtilSupport;
use Hilaoyu\LaravelExtend\Model;

abstract class AbstractModelAuthToken extends Model
{

    protected $table = 'auth_token';

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'user_id' ,
        'model' ,
        'platform' ,
        'source' ,
        'client_ip' ,
        'expire_time' ,
    ];

    protected $hidden = [
        'model',
    ];

    public function getValidationRules()
    {
        $rules = [
            'user_id' => 'required|string|max:60',
            'model' => 'required|string',
        ];

        return $rules;
    }

    use ModelWithLoginRefreshTrait;
    protected function fieldNameLoginTime(): string
    {
        return '';
    }


}
